package com.ruoyi.system.basicInformation.mapper;

import com.ruoyi.system.basicInformation.bo.TTerminalAddBo;
import com.ruoyi.system.basicInformation.bo.TTerminalMileageAddBo;
import com.ruoyi.system.basicInformation.bo.TTerminalQueryBo;
import com.ruoyi.system.basicInformation.domain.TTerminal;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.system.basicInformation.vo.TTerminalVo;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 终端注册Mapper接口
 *
 * @author ruoyi
 * @date 2021-05-21
 */
public interface TTerminalMapper extends BaseMapper<TTerminal> {

    TTerminalVo queryByTerminalId(@Param("terminalId")String terminalId);
    /**
     * 查询记录
     * @param query
     * @return
     */
    List<TTerminalVo> terminalInlineStatistics(@Param("query") TTerminalQueryBo query);

    /**
     * 查询记录
     * @param query
     * @return
     */
    List<TTerminalVo> terminalOnlineRate(@Param("query") TTerminalQueryBo query);

    /**
     * 查询记录
     * @param query
     * @return
     */
    List<TTerminalVo> terminalInlineChildrenStatistics(@Param("query") TTerminalQueryBo query);

    /**
     * 查询记录
     * @param query
     * @return
     */
    List<TTerminalVo> terminalInlineChildrenStatisticsY(@Param("query") TTerminalQueryBo query);

    /*
     * 判断是否存在
     * */
    int checkIsExists(String equipmentNumber);

    Integer updateTerminalByObjId(@Param("id")Long id,@Param("objId")Long objId);

    /**
     * 查询记录
     * @param query
     * @return
     */
    List<TTerminalVo> selectDTO(@Param("query") TTerminalQueryBo query);

    List<TTerminalVo> listTouristCurrentPoint(@Param("areaId")Long areaId);

    Integer insertTaskByAddBo(TTerminalAddBo bo);


    Integer insertMileage(TTerminalMileageAddBo bo);

    void deleteTerminalOnline();

    void insertTerminalOnline();
}
